package com.kylin.builder.improve;

public class Client {

    public static void main(String[] args) {

        //盖普通房子
        CommonHouse commonHouse = new CommonHouse();
        //准备创建房子的指挥者
        HouseDirector houseDirector = new HouseDirector(commonHouse);

        //完成盖房子，返回房子（产品）
        House house = houseDirector.constructHouse();

        //盖高楼
        HighHouse highHouse = new HighHouse();
        //重置建造者
        houseDirector.setHouseBuilder(highHouse);
        houseDirector.constructHouse();
    }
}
